package misc;

public class WhileTest {

	
	public static void main(String[] args) {
		while(condition()){
			
		System.out.println("entering while");	
		System.out.println("leaving while");	
			
		}
	}

	 static boolean condition() {
	double d=	 Math.random();
	boolean result=d<0.99;	 
	System.out.println(result+" "+d);
	
		 
		 return result;
	}
}
